home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / util / libs / MUI_ASL.lha / MUI-ASL / Install < prev    next >
Text File  |  1997-10-08  |  10KB  |  249 lines

  1. ;--------------------------------------------------------------------------
  2. ; $VER: MUI-ASL Installer script 40.6 (7.9.97) by Flavio Stanchina
  3. ; Originally by Marcin Orlowski <carlos@dedal.man.szczecin.pl>
  4. ;--------------------------------------------------------------------------
  5. ;
  6. ; History
  7. ; --------------------
  8. ; 10.11.96 14:32:08 - Initial release
  9. ;
  10. ;--------------------------------------------------------------------------
  11.  
  12. (set #lib-source "Libs")
  13. (set #mcc-source "Libs/MUI")
  14. (set #cat-source "Locale/Catalogs")
  15. (set #exe-source "C")
  16. (set #lib-dest   "LIBS:")
  17. (set #mcc-dest   "MUI:Libs/MUI")
  18. (set #cat-dest   "LOCALE:Catalogs")
  19. (set #exe-dest   "C:")
  20.  
  21. (set #lib-name "MUI-ASL.library")
  22. (set #patch-name "PatchAsl")
  23.  
  24. (procedure P_copylang
  25.  (foreach (tackon #cat-source #lang) "#?.catalog"
  26.   (copylib (source (tackon (tackon #cat-source #lang) @each-name))
  27.            (dest (tackon #cat-dest #lang)))
  28.  )
  29. )
  30.  
  31. (set #def-lang-english     0)
  32. (set #def-lang-dansk       1)
  33. (set #def-lang-deutsch     2)
  34. (set #def-lang-español     4)
  35. (set #def-lang-français    8)
  36. (set #def-lang-italiano   16)
  37. (set #def-lang-nederlands 32)
  38. (set #def-lang-norsk      64)
  39. (set #def-lang-português 128)
  40. (set #def-lang-svenska   256)
  41.  
  42. (set @default-dest "")
  43.  
  44. ;*** Strings ***
  45.  
  46. ;;;(if (= @language "english") (
  47.   (set #bad-kick "Sorry, MUI-ASL requires Kickstart 3.0 (V39) or later.")
  48.   (set #bad-CPU  "Sorry, MUI-ASL requires at least a 68020.")
  49.   (set #bad-MUI  "Sorry, MUI-ASL requires MUI 3.8 or later.")
  50.  
  51.   (set #def-lang #def-lang-english)
  52.   (set #lang-prompt "Select languages you will use with MUI-ASL\n(English is built-in)")
  53.  
  54.   (set #rename-prompt "Rename \"%s\"\nas \"%s\"?")
  55.   (set #rename-help (cat "   The previous versions of MUI-ASL saved a copy of your original"
  56.                          " 'asl.library' under a different name, so that it could be restored"
  57.                          " in case of a problem in MUI-ASL.\n"
  58.                          "   This version of MUI-ASL doesn't replace your 'asl.library' anymore,"
  59.                          " so it is recommended to restore the original one."))
  60.  
  61.   (set #patch-prompt "Do you want to install the patch program?")
  62.   (set #patch-help (cat "   The patch program will activate MUI-ASL in place of the traditional 'asl.library'.\n"
  63.                         "   Later during the installation you will be asked if"
  64.                         " you want to run the patch program during system startup."))
  65.  
  66.   (set #mcc-prompt "Do you want to copy the MUI custom class '%s' to '%s'?")
  67.   (set #mcc-help (cat "   MUI custom classes are components that extend MUI functionality.\n"
  68.                       "   This class (%s) is essential for the operation of MUI-ASL.")
  69.  
  70.   (set #help-prompt "Do you want to install the English help in \"HELP:english\"?")
  71.   (set #help-help (cat "   I will place the English help in \"HELP:english\".\n"
  72.                        "   If you install the help file, you will be able to get context-sensitive"
  73.                        " help in MUI-ASL requesters by pressing the HELP key."))
  74.  
  75.   (set #startup-prompt "Do you want to run the patch program during system startup?")
  76.   (set #startup-help (cat "   You need to run the patch program if you want to activate MUI-ASL.\n"
  77.                           "   After installation the patch program will be started by the 'User-Startup' script."
  78.                           " For optimal performance it should be started by the 'Startup-Sequence'"
  79.                           " script, just after the 'SetPatch' command."
  80.                           " Therefore, expert users should manually move the line that runs 'PatchAsl'"
  81.                           " from the 'User-Startup' file to the 'Startup-Sequence' file.\n"
  82.                           "   If you are not confident with this task, don't take any risk!"
  83.                           " This explanation is incomplete on purpose just to keep inexperienced"
  84.                           " users from messing up with things they are not confident with."
  85.                           " The author will refuse any responsibility."))
  86.  
  87.   (set #exit-message "You have to reboot to see MUI-ASL at work.\nHave fun!")
  88. ;;;))
  89.  
  90. (if (= @language "italiano") (
  91.   (set #bad-kick "Spiacente, MUI-ASL richiede il Kickstart 3.0 (V39) o successivo.")
  92.   (set #bad-CPU  "Spiacente, MUI-ASL richiede almeno un 68020.")
  93.   (set #bad-MUI  "Spiacente, MUI-ASL richiede MUI 3.8 o successiva.")
  94.  
  95.   (set #def-lang #def-lang-italiano)
  96.   (set #lang-prompt "Scegli le lingue che userai con MUI-ASL\n(l'inglese è incorporato)")
  97.  
  98.   (set #rename-prompt "Rinominare \"%s\"\ncome \"%s\"?")
  99.   (set #rename-help (cat "   Le versioni precedenti di MUI-ASL mantenevano una copia della"
  100.                          " 'asl.library' originale con un altro nome, così da poterla"
  101.                          " ripristinare in caso di problemi con MUI-ASL.\n"
  102.                          "   Questa versione di MUI-ASL non sostituisce più la 'asl.library',"
  103.                          " pertanto è consigliato ripristinare quella originale."))
  104.  
  105.   (set #patch-prompt "Vuoi installare il programma di patch?")
  106.   (set #patch-help (cat "   Il programma di patch attiverà MUI-ASL al posto della 'asl.library' tradizionale.\n"
  107.                         "   Più avanti nel corso dell'installazione verrà chiesto se"
  108.                         " avviare il programma di patch durante l'avvio del sistema."))
  109.  
  110.   (set #mcc-prompt "Vuoi copiare la classe MUI '%s' in '%s'?")
  111.   (set #mcc-help (cat "   Le classi MUI sono dei componenti aggiuntivi che estendono le funzionalità di MUI.\n"
  112.                       "   Questa classe (%s) è indispensabile per il funzionamento di MUI-ASL.")
  113.  
  114.   (set #help-prompt "Vuoi installare la guida in inglese in \"HELP:english\"?\n\n(spiacente, la guida in italiano non è disponibile... qualcuno vuole scriverla?)")
  115.   (set #help-help (cat "   Copierò la guida in inglese in \"HELP:english\" (spiacente, la guida in italiano non è disponibile).\n\n"
  116.                        "   Se installi il file della guida, potrai avere una spiegazione sensibile al contesto nei requester di MUI-ASL premendo il tasto HELP."))
  117.  
  118.   (set #startup-prompt "Vuoi avviare il programma di patch durante l'avvio del sistema?")
  119.   (set #startup-help (cat "   È mecessario avviare il programma di patch se si vuole attivare MUI-ASL.\n"
  120.                           "   Dopo l'installazione il programma di patch verrà eseguito dal file 'User-Startup'."
  121.                           " Per un funzionamento ottimale è preferibile eseguirlo dal file 'Startup-Sequence',"
  122.                           " immediatamente dopo il comando 'SetPatch'."
  123.                           " Pertanto si consiglia agli utenti esperti di spostare la riga che esegue 'PatchAsl'"
  124.                           " dal file 'User-Startup' al file 'Startup-Sequence'.\n"
  125.                           "   Se non sei sicuro di essere in grado di fare questa modifica, non correre rischi!"
  126.                           " Questa spiegazione è volutamente laconica proprio per evitare che"
  127.                           " gli utenti inesperti si avventurino in un campo sconosciuto."
  128.                           " L'autore declina ogni responsabilità in caso di inconvenienti."))
  129.  
  130.   (set #exit-message "Devi riavviare il computer per vedere MUI-ASL all'opera.\nBuon divertimento!")
  131. ))
  132.  
  133. ;*** Checking environment ***
  134.  
  135. (complete 0)
  136.  
  137. (if (< (getversion "LIBS:version.library") (* 39 65536)) (
  138.  (abort #bad-kick)
  139. ))
  140.  
  141. (if (< (database "cpu") 68020) (
  142.  (abort #bad-CPU)
  143. ))
  144.  
  145. (if (not (exists "MUI:" (noreq))) (
  146.  (abort #bad-MUI)
  147. ))
  148.  
  149. (set MUI_ver (getversion "MUI:Libs/muimaster.library"))
  150. (if (AND (< MUI_ver (* 19 65536)) (<> MUI_ver 0)) (abort #bad-MUI))
  151.  
  152. ;--------------------------------------------------------------------------
  153. ; choose language
  154. (set #cat-lang
  155.  (askoptions
  156.   (prompt #lang-prompt)
  157.   (choices
  158.    "Dansk"
  159.    "Deutsch"
  160.    "Español"
  161.    "Français"
  162.    "Italiano"
  163.    "Nederlands"
  164.    "Norsk"
  165.    "Português"
  166.    "Svenska"
  167.   )
  168.   (help @askoptions-help)
  169.   (default #def-lang)
  170.  )
  171. )
  172.  
  173. (complete 10)
  174.  
  175. ;--------------------------------------------------------------------------
  176. (set #oldname "LIBS:asl.library")
  177. (set #newname "LIBS:asl.library,orig")
  178.  
  179. ; check for existence of "asl.library" and "asl.library,orig"
  180. (if (and (exists #oldname (noreq)) (exists #newname (noreq))) (
  181.   (if (askbool (prompt (#rename-prompt #newname #oldname)) (help #rename-help)) (
  182.     (delete #oldname)
  183.     (rename #newname #oldname)
  184.   ))
  185. ))
  186.  
  187. (complete 20)
  188.  
  189. (copylib (source (tackon #lib-source #lib-name))
  190.          (dest #lib-dest))
  191.  
  192. (complete 25)
  193.  
  194. (copylib (source (tackon #exe-source #patch-name))
  195.          (dest #exe-dest)
  196.          (prompt #patch-prompt)
  197.          (help   #patch-help)
  198. )
  199.  
  200. (complete 30)
  201.  
  202. (foreach #mcc-source "#?.mcc" (
  203.  (copylib (source (tackon #mcc-source @each-name))
  204.           (dest #mcc-dest)
  205.           (prompt (#mcc-prompt @each-name #mcc-dest))
  206.           (help   (#mcc-help   @each-name)) (confirm))
  207. ))
  208.  
  209. (complete 40)
  210.  
  211. (if (askbool (prompt #help-prompt) (help #help-help) (default 1)) (
  212.  (copyfiles (source "Help/English/MUI-ASL.guide") (dest "HELP:english/"))
  213. ))
  214.  
  215. (complete 50)
  216.  
  217. ;--------------------------------------------------------------------------
  218. (if (> #cat-lang 0) (
  219.   (if (not (exists #cat-dest)) (makedir #cat-dest))
  220.  
  221. (complete 60)
  222.   (if (bitand #cat-lang #def-lang-dansk     ) ((set #lang "dansk"     ) (P_copylang)))
  223.   (if (bitand #cat-lang #def-lang-deutsch   ) ((set #lang "deutsch"   ) (P_copylang)))
  224.   (if (bitand #cat-lang #def-lang-español   ) ((set #lang "español"   ) (P_copylang)))
  225. (complete 70)
  226.   (if (bitand #cat-lang #def-lang-français  ) ((set #lang "français"  ) (P_copylang)))
  227.   (if (bitand #cat-lang #def-lang-italiano  ) ((set #lang "italiano"  ) (P_copylang)))
  228.   (if (bitand #cat-lang #def-lang-nederlands) ((set #lang "nederlands") (P_copylang)))
  229. (complete 80)
  230.   (if (bitand #cat-lang #def-lang-norsk     ) ((set #lang "norsk"     ) (P_copylang)))
  231.   (if (bitand #cat-lang #def-lang-português ) ((set #lang "português" ) (P_copylang)))
  232.   (if (bitand #cat-lang #def-lang-svenska   ) ((set #lang "svenska"   ) (P_copylang)))
  233. ))
  234.  
  235. (complete 90)
  236.  
  237. (startup "MUI-ASL"
  238.   (prompt #startup-prompt)
  239.   (help   #startup-help)
  240.   (command "Run <>NIL: C:PatchAsl")
  241. )
  242.  
  243. (complete 100)
  244.  
  245. ;--------------------------------------------------------------------------
  246. (exit #exit-message)
  247.  
  248. ;*** EOF ***
  249.